<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="format-detection" content="telephone=no"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <title>管理收货地址</title>
    <link rel="stylesheet" href="../../fonts/font_awesome/css/font-awesome.min.css">
    <link rel="stylesheet" href="../../js/mui/css/mui.min.css">
    <link rel="stylesheet" href="../../css/mui-app-style.css">
    <link rel="stylesheet" href="../../css/adress/address.css">
</head>
<body>
<header class="mui-bar mui-bar-nav">
    <a class="mui-action-back mui-icon mui-icon-back mui-pull-left"></a>
    <h1 class="mui-title"><!--管理收货地址--></h1>
</header>
<div class="mui-content" id="address">
    <!--<button type="button" @click="add()">add</button>-->
    <div class="address__item" v-for="(item,index) in items">
        <div class="mui-row address__item__info" @click="select(item)">
            <div class="mui-col-xs-8" >收货人：{{item.realname }}</div>
            <div class="mui-col-xs-4 mui-text-right">
                <span>{{item.phone}}</span>
            </div>
            <div class="mui-col-xs-12 address__item__detail">
                收货地址：{{item.address}}
            </div>
        </div>
        <div class="mui-row address__item__operate">
            <div class="mui-col-xs-7">
                <div class="mui-input-row " @click="setDefault(item)">
                    <span v-if="item.isDefault">
                        <span class="fa fa-check-circle" style="color: #2D8CF0"></span>默认地址
                    </span>
                    <span v-else>
                        <span class="fa fa-check-circle"></span>默认地址
                    </span>
                </div>
            </div>
            <div class="mui-col-xs-5 mui-text-right">
                <a href="address_edit.html"><i class="mui-icon mui-icon-compose"></i>编辑</a>
                <a href="#delete"><i class="mui-icon mui-icon-trash"></i>删除</a>
            </div>
        </div>
    </div>
    <div class="mui-button-fixed">
        <button @click="linktoCreate()" id="add" type="button" class="mui-btn mui-btn-primary mui-btn-block">添加新地址</button>
    </div>
    <div v-if="items.length==0">
        暂无地址信息，请先添加地址信息
    </div>
    <p id="info"></p>
</div>

<!--删除地址-->
<div id="delete" class="mui-popover mui-popover-action mui-popover-bottom">
    <ul class="mui-table-view">
        <li class="mui-table-view-cell" >
            <a id="delete_item" href="#" style="color: #FF3B30;">删除</a>
        </li>
    </ul>
    <ul class="mui-table-view">
        <li class="mui-table-view-cell">
            <a id="cancel" href="#"><b>取消</b></a>
        </li>
    </ul>
</div>

<script src="../../js/vue.js"></script>
<script src="../../js/mui/js/mui.min.js"></script>
<script src="../../js/common/crypto-js.js"></script>
<script src="../../js/common/common.js"></script>
<script src="../../js/adress/adress.js"></script>
<script>
</script>
</body>
</html>